package com.guigu.erp.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.guigu.erp.pojo.DesignConflgFileKind;
import com.guigu.erp.service.DesignConflgFileKindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * ClassName:DesignConflgFileKindController
 * Package:com.guigu.erp.controller
 * Description:
 *
 * @Date:2024/2/22 17:10
 * @Author:chenchong
 */
@CrossOrigin
@Controller
@RequestMapping("/DesignConflgFileKind")
public class DesignConflgFileKindController {

    @Autowired
    private DesignConflgFileKindService designConflgFileKindService;

    //查询I级II级III级分类
    @RequestMapping("/List")
    @ResponseBody
    public List<DesignConflgFileKind> DesignConflgFileKindList(int num) {
        QueryWrapper<DesignConflgFileKind> qw = new QueryWrapper<>();
        qw.eq("KIND_LEVEL", num);
        List<DesignConflgFileKind> list = designConflgFileKindService.list(qw);
        return list;
    }
    //查询I级II级III级分类
    @RequestMapping("/select")
    @ResponseBody
    public List<DesignConflgFileKind> select(int select1,int select2) {
        QueryWrapper<DesignConflgFileKind> qw = new QueryWrapper<>();
        qw.eq("P_ID", select1);
        qw.eq("KIND_LEVEL", select2);
        List<DesignConflgFileKind> list = designConflgFileKindService.list(qw);
        return list;
    }



}
